package com.gxa.hualianeshop.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author bill
 * @since 2023-07-28
 */
@Getter
@Setter
@TableName("tb_order")
@ApiModel(value = "Order对象", description = "")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自增的主键id")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单编号,由雪花算法生成")
    @TableField("order_id")
    private String orderId;

    @ApiModelProperty("用户的编号")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("实际支付的金额")
    @TableField("actual_pay")
    private Long actualPay;

    @ApiModelProperty("支付方式:1.在线支付  2.货到付款")
    @TableField("payment_type")
    private Integer paymentType;

    @ApiModelProperty("买家留言")
    @TableField("buyer_message")
    private String buyerMessage;

    @ApiModelProperty("发票类型: 0无发票1普通发票，2电子发票，3增值税发票)")
    @TableField("invoice_type")
    private Integer invoiceType;

    @ApiModelProperty("物流单号")
    @TableField("shipping_code")
    private String shippingCode;

    @ApiModelProperty("物流名称")
    @TableField("shipping_name")
    private String shippingName;

    @ApiModelProperty("总金额")
    @TableField("total_pay")
    private Long totalPay;

    @ApiModelProperty("创建时间")
    @TableField("created")
    private LocalDateTime created;

    @ApiModelProperty("订单来源: 1:app端，2：pc端，3：M端，4：微信端，5：手机qq端")
    @TableField("source_type")
    private Integer sourceType;


}
